<!--添加栏目-->
<div class="dialog_content">
	<form id="info_form" action="{:U('Position/add')}" method="post">
	<table width="100%" class="table_form">
        <input type="hidden" name="cate_id" value="{$cate_id}" />
        <tr>
            <th>选择楼盘 :</th>
            <td>
                <span id="catebox">{$housename}</span>
                <button class="J_showdialog" data-pic="0" data-uri="{:U('House/publicPositionHouse',array('type'=>'checkbox','model'=>$model))}" data-zindex="2000" data-acttype="ajax" data-title="选择楼盘" data-id="select" data-width="670" data-height="500" data-boxtype="checkbox" data-boxname="houseid" data-val="house_id" data-displaybox="catebox">选择楼盘</button>
                <input type="hidden" name="house_id" id="house_id" value="{$houseid}">
            </td>
        </tr>
        <input type="hidden" name="model" value="{$model}" />
        <!--tr>
            <th>描述 :</th>
            <td></td>
        </tr-->
        <tr>
		<th>{:L('enabled')} :</th>
            <td>
                <label><input type="radio" name="status" value="1" checked="checked"> {:L('yes')}</label>&nbsp;&nbsp;
                <label><input type="radio" name="status" value="0"> {:L('no')}</label>
            </td>
        </tr>
	</table>
	</form>
</div>
<script>
    $(function(){
        $.formValidator.initConfig({formid:"info_form",autotip:true});
        $('#info_form').ajaxForm({success:complate,dataType:'json'});
        function complate(result){
            if(result.status == 1){
                $.dialog.get(result.dialog).close();
                $.pinphp.tip({content:result.msg});
                window.location.reload();
            } else {
                $.pinphp.tip({content:result.msg, icon:'alert'});
            }
        }
   });
    $("#catebox b.del").live('click',function(){
        var id = $(this).attr('data');
        $(this).parent().remove();
        var oldval = $("#house_id").val();
        $("#house_id").val(oldval.replace(id+',',''));
    });
</script>